package com.backend.springboot_project_demo.controller;

import com.backend.springboot_project_demo.entity.Role;
import com.backend.springboot_project_demo.mappers.RoleMapper;
import com.backend.springboot_project_demo.service.SearchRoleService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/role")
public class RoleController {
    private @Resource SearchRoleService searchRoleService;

    @GetMapping("/roles")
    public Role findById() {
        Role role = searchRoleService.findById("1");
        System.out.println(role);
        return role;
    }
}
